<?php
	include_once $_SERVER["DOCUMENT_ROOT"].'/service/entite/albumphoto/AlbumPhotoService.php';
	include_once $_SERVER["DOCUMENT_ROOT"].'/service/entite/miniaturephoto/MiniaturePhotoService.php';
	
	class GererAlbumPhotoService {
		public static function ajouterAlbumPhoto() {
			return AlbumPhotoService::createAlbumPhoto();
		}
		
		public static function modifierAlbumPhoto($id) {
			return AlbumPhotoService::getAlbumPhotoForModification($id);
		}
		
		public static function getAlbumPhotoByID($id, $loadListePhotoAlbum = false) {
			return AlbumPhotoService::getAlbumPhotoByID($id, $loadListePhotoAlbum);
		}
		
		public static function validerAlbumPhoto(AlbumPhotoEntite $albumPhotoEntite) {
			AlbumPhotoService::save($albumPhotoEntite);
		}
		
		public static function supprimerAlbumPhoto($id) {
			AlbumPhotoService::supprimerAlbumPhoto($id);
		}
		
		public static function getListeAlbumPhoto() {
			return AlbumPhotoService::getListeAlbumPhoto();
		}
		
		public static function insertWithValues($id, $nom, $commentaire) {
			return AlbumPhotoService::insertWithValues($id, $nom, $commentaire);
		}
		
		public static function createRepertoireAlbumPhoto($albumPhotoId) {
			return AlbumPhotoService::createRepertoireAlbumPhoto($albumPhotoId);
		}
		
		public static function getMiniature($photo) {
			if ($photo == null) {
				return null;
			}
			return MiniaturePhotoService::getMiniature($photo);
		}
		
		public static function getListeMiniature($albumPhotoEntite) {
			return AlbumPhotoService::getListeMiniature($albumPhotoEntite);
		}
		
		public static function getListeMiniatureFromAlbumId($idAlbumPhoto) {
			$albumPhotoEntite = AlbumPhotoService::getAlbumPhotoByID($idAlbumPhoto);
			return GererAlbumPhotoService::getListeMiniature($albumPhotoEntite);
		}
		
		public static function loadCouverture($albumPhotoEntite) {
			return AlbumPhotoService::loadCouverture($albumPhotoEntite);
		}
		
		public static function getPhotoFromAlbum($albumPhotoEntite, $nomPhotoAlbum) {
			return PhotoService::getPhotoByNomFichierAndIDAlbumPhoto($albumPhotoEntite->id, $nomPhotoAlbum);
		}
		
		public static function deletePhoto($albumPhotoEntite, $nomPhotoAlbum) {
			return PhotoService::deletePhoto($albumPhotoEntite, $nomPhotoAlbum);
		}
	}
?>